package org.irri.smta.repository;

import java.util.List;

import javax.inject.Named;

import org.irri.smta.domain.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

@Named("roleRepository")
public interface IRoleRepository extends JpaRepository<Role, Long> {

	@Transactional(readOnly = true)
	@Query("SELECT o FROM Role o ORDER BY o.name ASC")
	List<Role> findAllOrdered();

}
